//
//  CYInfomationThreeImageTableViewCell.m
//  cyydt
//
//  Created by chu on 2019/2/3.
//  Copyright © 2019 chu. All rights reserved.
//

#import "CYInfomationThreeImageTableViewCell.h"

@implementation CYInfomationThreeImageTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
}

- (void)setModel:(CYProjectModel *)model{
    _model = model;
    NSArray *imgs = [model.images componentsSeparatedByString:@","];
    self.label1.text = model.catname;
    self.label3.text = model.created_time;
    self.label2.text = [NSString stringWithFormat:@"%@评论",model.comment_number];
    [self.imageView1 sd_setImageWithURL:[NSURL URLWithString:imgs[0]] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.imageView1.frame.size]];
    [self.imageView2 sd_setImageWithURL:[NSURL URLWithString:imgs[1]] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.imageView1.frame.size]];
    [self.imageView3 sd_setImageWithURL:[NSURL URLWithString:imgs[2]] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.imageView1.frame.size]];

    self.titleLabel.text = model.title;
    
}

- (void)setProjectModel:(CYProjectModel *)projectModel{
    _projectModel = projectModel;
    
    self.label1.text = projectModel.catname;
 
    [self.imageView1 sd_setImageWithURL:[NSURL URLWithString:projectModel.dpa_img_1] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.imageView1.frame.size]];
    [self.imageView2 sd_setImageWithURL:[NSURL URLWithString:projectModel.dpa_img_2] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.imageView1.frame.size]];
    [self.imageView3 sd_setImageWithURL:[NSURL URLWithString:projectModel.dpa_img_3] placeholderImage:[UIImage imageWithColor:[UIColor lightGrayColor] Size:self.imageView1.frame.size]];
    
    self.titleLabel.text = projectModel.title;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
